package week07

// 771. 宝石与石头
// https://leetcode-cn.com/problems/jewels-and-stones/

func numJewelsInStones(jewels string, stones string) int {
	var mapp = make(map[byte]struct{})
	for i := range jewels {
		mapp[jewels[i]] = struct{}{}
	}
	var ans = 0
	for i := range stones {
		if _, ok := mapp[stones[i]]; ok {
			ans++
		}
	}
	return ans
}